﻿namespace ConsoleApp3
{
    //3 自动属性初始化表达式

    class Person
    {
        public string name { get; set; } = "shang";
        public string age { get; set; } = "23";
        public string sex { get; } = "男";   //只读属性
    }

    internal class Program
    {
        static void Main(string[] args)
        {
            Person person = new Person();
            Console.WriteLine($"name: {person.name}\nage: {person.age}\nsex:{person.sex}");
        }
    }
}